package com.hgw.Demo09_StrategyPattern.examples;

/**
 * Data time:2021/12/20 20:46
 * StudentID:2019112118
 * Author:hgw
 * Description: VIP会员票折扣类，充当具体策略类
 */
public class VIPDiscount implements Discount{
    private final double DISCOUNt = 0.5;

    public double calculate(double price) {
        System.out.println("VIP票");
        System.out.println("增加积分!");
        return price * DISCOUNt;
    }
}
